package edu.university.demo.system.intercept;

import edu.university.demo.core.aop.Invocation;
import edu.university.demo.core.intercept.BladeValidator;

public class RegisterValidator extends BladeValidator {

	@Override
	protected void doValidate(Invocation inv) {
		
		validateRegex("loginName", "[A-Za-z]{4,8}", "登录名由4~8位字母组成");
		validateRegex("name", "[a-zA-Z\u4e00-\u9fa5]{3,6}", "用户名由3~6位字母或中文组成");
		validateRegex("plainPassword", passwordPattern, "密码由字母数字组成，6-20位");
		validateEqualField("plainPassword", "confirmPassword", "两次密码不一致");
	}

}
